package com.es.www.simpleFactory;

/**
 * @Created by michangtao
 * @Date 2022/4/28 16:02
 * @Description
 */
public class Singleton3 {

    private Singleton3(){
        System.out.println("构造函数");
    }

    private static class InnerSingleton {
        private static Singleton3 instance = new Singleton3();
    }

    public static Singleton3 getInstance(){
        return InnerSingleton.instance;
    }

    public static void createString(){
        System.out.println("调用了方法");
    }
}
